pub fn triangle(n: i32) -> i32 {
    println!("--------triangle--------");
    (1..=n).fold(0, |sum, item| sum + item)
}